﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TotalCERefresher : MonoBehaviour
{
    // Start is called before the first frame update
    Side m_Side;
    public bool IsOwnSide = true;
    public bool IsExposed = true;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if(IsOwnSide)
            m_Side = VSController.Instance.GetCurrSide();
        else 
            m_Side = VSController.Instance.GetOppositeSide();
        if(IsExposed) {
            GetComponent<Text>().text = m_Side.ExposedValue.ToString();
        } else {
            GetComponent<Text>().text = m_Side.HiddenValue.ToString();
        }
        
    }
}
